package top.scsoul.pas.utils;

import org.springframework.util.DigestUtils;

public class Md5Util {
    private static String salt = "dhasjdhak4eygb678iuh";

    public static String encodeByMd5(String str) {
        return DigestUtils.md5DigestAsHex((str + salt).getBytes());
    }

    public static boolean test(String md5Str, String planStr) {
        return md5Str.equals(DigestUtils.md5DigestAsHex((planStr + salt).getBytes()));
    }
}
